xa,ya,za = map(int,input().split())
xb,yb,zb = map(int,input().split())
xc,yc,zc = map(int,input().split())
xd,yd,zd = map(int,input().split())

ab_dec = [xa-xb,ya-yb,za-zb]
cd_dec = [xc-xd,yc-yd,zc-zd]

ac = [xa-xc,ya-yc,za-zc]

f_dec = [0]*3
f_dec[0] = ab_dec[1]*cd_dec[2] -ab_dec[2]*cd_dec[1]
f_dec[1] = ab_dec[2]*cd_dec[0]- ab_dec[0]*cd_dec[2]
f_dec[2] = ab_dec[0]*cd_dec[1] -ab_dec[1]*cd_dec[0]

l = abs(ac[0]*f_dec[0] + ac[1]*f_dec[1] + ac[2]*f_dec[2])/((f_dec[0])**2 + (f_dec[1])**2 +(f_dec[2])**2)**5
print(l)
